<template>
  <div @click="click1()">
    <!-- 方法一 -->
    <!-- <div @click="click2()"> -->
    <div @click.stop="click2()">
      click me
    </div>
  </div>
</template>

<script setup lang="ts">
const click1 = () => {
  console.log('click1')
}

// 方法一
/* const click2 = () => {
  // vue3 直接暴露event对象
  event.stopPropagation();
  console.log('click2')
} */

// 方法二
const click2 = () => {
  console.log('click2')
}
</script>